package com.zd.mapper;

import com.zzg.entity.Outsourcing;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Description: OutsourcingzdMapper
 * @Author:pioneer
 * @Date: 2021-07-12
 * @Version:v1.0
 */
@Mapper
public interface OutsourcingzdMapper {
    /**
     * 新增外包信息
     * @param outsourcing 外包对象
     * @return 返回数值判断是否添加成功
     */
    public int insertoutsourcing(Outsourcing outsourcing);
    /**
     * 根据外包单号查询
     * @param outsourcingid 外包id
     * @return 外包集合
     */
    public List<Outsourcing> getOutsourcingByid(@Param("outsourcingid") String outsourcingid);

    /**
     * 根据外包单号删除外包
     * @param orderno  外包单号
     * @return 返回数值判断是否删除成功
     */
    public int delectOutsourcing(@Param("orderno") String orderno);

    /**
     * 根据货运信息查询外包
     * @param freightInformation 货运id
     * @return 外包集合
     */
    public Outsourcing getoutsourcegoodsid(@Param("freightInformation") String freightInformation);

    /**
     * 根据货物id修改外包信息
     * @param outsourcingOrder 外包单号
     * @param subcontractDate 转包日期
     * @param freight 外包运费
     * @param type 外包类型
     * @param freightInformation  货物信息
     * @return 返回数值判断是否修改成功
     */
    public int updateOutsourcing(@Param("outsourcingOrder") String outsourcingOrder, @Param("subcontractDate") String subcontractDate, @Param("freight") String freight, @Param("type") String type, @Param("freightInformation") String freightInformation);
}
